package com.qf.day06.homework;

public class Hero {
    //属性有 名字，力量，智力，敏捷
    private String name;
    private int power;
    private int iq;
    private int quick;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public int getIq() {
        return iq;
    }

    public void setIq(int iq) {
        this.iq = iq;
    }

    public int getQuick() {
        return quick;
    }

    public void setQuick(int quick) {
        this.quick = quick;
    }

    public Hero(String name, int power, int iq, int quick) {
        this.name = name;
        this.power = power;
        this.iq = iq;
        this.quick = quick;
    }

    @Override
    public String toString() {
        return "Hero{" +
                "name='" + name + '\'' +
                ", power=" + power +
                ", iq=" + iq +
                ", quick=" + quick +
                '}';
    }
    public void UnarmedAttacks(){
        System.out.println(getName()+"进行了一次徒手攻击！");
        this.power *= 0.2;
        System.out.println("power:"+ power);
    }
}
